package com.lc.service;

import com.lc.mapper.ShopMapper;
import com.lc.pojo.Car;
import com.lc.pojo.Shop;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ShopServiceImpl  implements ShopService{
    @Autowired
    ShopMapper shopMapper;

    @Override
    public boolean updateShop(Shop shop){
        int flag = 0;
        try {
            flag = shopMapper.updateShop(shop);
        } catch (Exception e) {
            return false;
        }
        if (flag == 1) {
            return true;
        } else {
            return false;
        }

    }
    @Override
    public boolean addShop(Shop shop){
        int flag = 0;
        try {
            flag = shopMapper.addShop(shop);
        } catch (Exception e) {
            return false;
        }
        if (flag == 1) {
            return true;
        } else {
            return false;
        }
    }
}
